{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 导入模块 前期准备"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "# coding:utf-8\n",
    "\n",
    "import jieba\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "from sklearn.decomposition import LatentDirichletAllocation\n",
    "from sklearn.feature_extraction.text import CountVectorizer"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 将倾城之恋每个章节进行拆分和建列表"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 获取每个章节的内容\n",
    "def format_chapters(file):\n",
    "    # 读取文件\n",
    "    with open(file, \"r\",encoding=\"utf-8-sig\") as f:\n",
    "        article = f.read()\n",
    "    # 切分章节\n",
    "    chapters = article.split(\"------------\")[1:]\n",
    "    # 创建空列表，存储每个章节的内容\n",
    "    chapter_contents = []\n",
    "    # 遍历切分后的每个章节\n",
    "    for chapter in chapters:\n",
    "        # 创建空字符串\n",
    "        content = \"\"\n",
    "        # 用换行符切分每个章节\n",
    "        lines = chapter.split(\"\\n\")\n",
    "        # 遍历每一行\n",
    "        for line in lines[3:]:\n",
    "            # 如果不为空\n",
    "            if line != \"\":\n",
    "                # 将其内容加入字符串\n",
    "                content += line\n",
    "        # 将字符串加入章节内容列表\n",
    "        chapter_contents.append(content)\n",
    "    # 返回章节内容列表\n",
    "    return chapter_contents"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 打印每个主题下权重较高的term"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 打印每个主题前n个词语\n",
    "def print_top_words(model, feature_names, n_top_words):\n",
    "    #打印每个主题下权重较高的term\n",
    "    for topic_idx, topic in enumerate(model.components_):\n",
    "        print(\"Topic #%d:\" % topic_idx)\n",
    "        print(\" \".join([feature_names[i] for i in topic.argsort()[:-n_top_words - 1:-1]]))\n",
    "        print()\n",
    "    #打印主题-词语分布矩阵\n",
    "    # print(model.components_)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 绘制热力图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Building prefix dict from the default dictionary ...\n",
      "Dumping model to file cache C:\\Users\\lsm\\AppData\\Local\\Temp\\jieba.cache\n",
      "Loading model cost 0.893 seconds.\n",
      "Prefix dict has been built successfully.\n",
      "findfont: Font family ['sans-serif'] not found. Falling back to DejaVu Sans.\n",
      "findfont: Font family ['sans-serif'] not found. Falling back to DejaVu Sans.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Topic #0:\n",
      "多着呢 管着 闹着玩 着床 两腿 正拉着 拉着 咳嗽 连忙 若无其事 著要 一口 吕础 趿着 抵住 碰着 中闪 夯旱 酵罚 故窃朴 蒙着 梦腋 叩娜 纯础 涣烁 垂着头 吕锤 缫膊 频纳 缴嫌\n",
      "\n",
      "Topic #1:\n",
      "振保 烟鹂 坐在 回来 女人 脸上 像是 余妈 晚上 仿佛 胡琴 渐渐 解释 背后 不知 一只 一种 我待 感到 窗口 无线电 浴室 三轮车 射出去 孔雀 洋伞 砸碎 夜晚 床上 一路\n",
      "\n",
      "Topic #2:\n",
      "流苏 太太 奶奶 范柳原 香港 小姐 孩子 上海 柳原 回来 一只 女人 家里 一声 老太太 一间 房子 金枝 跳舞 打听 一点 机会 白公馆 一同 两个 宝络 徐先生 汽车 吃饭 喜欢\n",
      "\n",
      "Topic #3:\n",
      "流苏 柳原 女人 太太 浅水湾 香港 阿栗 萨黑夷妮 饭店 上海 一声 说话 仿佛 渐渐 中国 隔壁 徐先生 也许 一只 范柳原 顽固 白小姐 英国人 房间 印度 两人 声音 一笑 众人 一点\n",
      "\n",
      "Topic #4:\n",
      "多着呢 管着 闹着玩 着床 两腿 正拉着 拉着 咳嗽 连忙 若无其事 著要 一口 吕础 趿着 抵住 碰着 中闪 夯旱 酵罚 故窃朴 蒙着 梦腋 叩娜 纯础 涣烁 垂着头 吕锤 缫膊 频纳 缴嫌\n",
      "\n",
      "Topic #5:\n",
      "太太 奶奶 流苏 老太太 三爷 四爷 两个 胡琴 宝络 母亲 孩子 范柳原 小姐 这话 阳台 听见 女儿 七妹 法律 一声 离婚 从前 仿佛 眼睛 金蝉 金枝 堂屋 七八年 年纪 你别\n",
      "\n",
      "Topic #6:\n",
      "多着呢 管着 闹着玩 着床 两腿 正拉着 拉着 咳嗽 连忙 若无其事 著要 一口 吕础 趿着 抵住 碰着 中闪 夯旱 酵罚 故窃朴 蒙着 梦腋 叩娜 纯础 涣烁 垂着头 吕锤 缫膊 频纳 缴嫌\n",
      "\n",
      "Topic #7:\n",
      "流苏 柳原 也许 懂得 溃骸 一点 发胖 恋爱 低头 结婚 外面 女人 太太 我要 第一次 想象 精神 旅馆 房子 海滩 喜欢 上海 玻璃杯 蚊子 叶子 底下 电影 茶叶 哪一部 适宜\n",
      "\n",
      "Topic #8:\n",
      "多着呢 管着 闹着玩 着床 两腿 正拉着 拉着 咳嗽 连忙 若无其事 著要 一口 吕础 趿着 抵住 碰着 中闪 夯旱 酵罚 故窃朴 蒙着 梦腋 叩娜 纯础 涣烁 垂着头 吕锤 缫膊 频纳 缴嫌\n",
      "\n",
      "Topic #9:\n",
      "多着呢 管着 闹着玩 着床 两腿 正拉着 拉着 咳嗽 连忙 若无其事 著要 一口 吕础 趿着 抵住 碰着 中闪 夯旱 酵罚 故窃朴 蒙着 梦腋 叩娜 纯础 涣烁 垂着头 吕锤 缫膊 频纳 缴嫌\n",
      "\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "findfont: Font family ['sans-serif'] not found. Falling back to DejaVu Sans.\n",
      "d:\\python\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:214: RuntimeWarning: Glyph 27599 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "d:\\python\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:214: RuntimeWarning: Glyph 31456 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "d:\\python\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:214: RuntimeWarning: Glyph 28909 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "d:\\python\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:214: RuntimeWarning: Glyph 21147 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "d:\\python\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:214: RuntimeWarning: Glyph 22270 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "findfont: Font family ['sans-serif'] not found. Falling back to DejaVu Sans.\n",
      "d:\\python\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:214: RuntimeWarning: Glyph 20027 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "d:\\python\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:214: RuntimeWarning: Glyph 39064 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "d:\\python\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:214: RuntimeWarning: Glyph 33410 missing from current font.\n",
      "  font.set_text(s, 0.0, flags=flags)\n",
      "d:\\python\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:183: RuntimeWarning: Glyph 20027 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "d:\\python\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:183: RuntimeWarning: Glyph 39064 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "d:\\python\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:183: RuntimeWarning: Glyph 31456 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "d:\\python\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:183: RuntimeWarning: Glyph 33410 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "d:\\python\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:183: RuntimeWarning: Glyph 27599 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "d:\\python\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:183: RuntimeWarning: Glyph 28909 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "d:\\python\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:183: RuntimeWarning: Glyph 21147 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n",
      "d:\\python\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py:183: RuntimeWarning: Glyph 22270 missing from current font.\n",
      "  font.set_text(s, 0, flags=flags)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAABB0AAAL0CAYAAABAnk/uAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAuIwAALiMBeKU/dgAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAgAElEQVR4nOzde7hld10f/vdnJoFAggO5oRmqgihyGeVia/GHv6Bgg/yqlgqEUmpiSRVGfmJNKQSUJFoEfbQV0UhpkKRWMCYtt9YSBGJ+IBe1Ep14gXAxyAQYSMqUSzCX+fz+2GfMmX3mss8+e+19Tvbr9Tznec5ae3/X+mSddc6T/Z7P97uquwMAAAAwa9sWXQAAAABw9yR0AAAAAAYhdAAAAAAGIXQAAAAABiF0AAAAAAYhdAAAAAAGIXQAAAAABiF0AAAAAAYhdAAAAAAGIXQAAAAABiF0AAAAAAYhdAAAAAAGIXQAAAAABiF0AAAAAAYhdAAAAAAGIXQAAAAABiF0AAAAAAYhdAAAAAAGIXQAAAAABiF0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zKSdf/YoaVZUVT0myWmZLPh37WTSQ5Lkf3X3y0cLtno6yXcl+W+Z/KXnxkw+IJ65r4O2m+6+M5PvtSRJVd0y2dzWvljvFZl8mD4kyfWZXMLvF0dNtLrOzuSv0x+Y3r8ikzUeWO9lSd7d3R8ZO8iK+w9J/nsm33s7MilFXzhqotX0okx+R3hAJt9/39LdFpqGLaC69zRDEAAAAGBznF4BAAAADELpAAAAAAxC6QAAAAAMQukAAAAADELpAAAAAAxC6QAAAAAMQukAAAAADELpAAAAAAxC6QAAAAAMQukAAAAADELpAAAAAAxC6QAAAAAMQukAAAAADELpAAAAAAxC6QAAAAAMQukAAAAADELpAAAAAAxC6QAAAAAMQukAAAAADELpAAAAAAxC6QAAC1JVPeft5dPHv3bOx3967P9tAAAbccjYAQDgIPPCJNfsY///nLn/9iSv3Mfjn57kFzYbCgBgDEoHAFisT3T3h/a2s6rumNn0+f08/lELSwYAsGROrwAAAAAGoXQAAAAABqF0AAAAAAahdAAAAAAGoXQAAAAABqF0AAAAAAahdAAAAAAGoXQAAAAABqF0AAAAAAahdAAAAAAGoXQAAAAABqF0AAAAAAahdAAAAAAGoXQAAAAABnHI2AEA4CDz2Kr64j72P2jm/kOq6on7ePyjF5AJAGAUSgcAWKzL5njMb675+nlJPrifx39m43EAAMZT3T12BgAAAOAgZE0HAAAAYBBKBwAAAGAQSgcAAABgEEoHAAAAYBBKBwAAAGAQSgcAAABgEEoHAAAAYBBKBwAAAGAQSgcAAABgEEoHAAAAYBBKBwAAAGAQSgcAAABgEEoHAAAAYBBKBwAAAGAQSgcAAABgEEoHAAAAYBBKBwAAAGAQSgcAAABgEEoHAAAAYBBKBwAAAGAQSgcAAABgEEoHAAAAYBBKBwAAAGAQSgcAAABgEEoHAAAAYBBKBwAAAGAQSgcAAABgEEoHAAAAYBBKBwAAAGAQ/x9k6UWZceKORwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 1200x750 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 绘制热力图\n",
    "def plot_topic(doc_topic):\n",
    "    # 设置图片大小和清晰度\n",
    "    plt.figure(figsize=(4, 2.5), dpi=300)\n",
    "    # MAC下设置中文字体\n",
    "    plt.rcParams['font.sans-serif'] = ['Arial Unicode MS']\n",
    "    # Windows下设置中文字体\n",
    "    # plt.rcParams['font.sans-serif'] = ['SimHei']\n",
    "    # 设置坐标轴文字大小\n",
    "    plt.tick_params(labelsize=3)\n",
    "    # 设置热力图主题\n",
    "    cmap = sns.cubehelix_palette(start=1, rot=3, gamma=0.8, as_cmap=True)\n",
    "    # 绘制热力图\n",
    "    sns.heatmap(data = doc_topic, square=False, cmap=cmap, linewidths=0.05)\n",
    "    # 添加坐标轴标题和图标题\n",
    "    plt.title(\"每章热力图\",fontsize=8)\n",
    "    plt.xlabel(\"主题\",fontsize=5)\n",
    "    plt.ylabel(\"章节\",fontsize=5)\n",
    "    # 保存热力图\n",
    "    plt.savefig('热力图.jpg', bbox_inches='tight')\n",
    "    # 显示热力图\n",
    "    plt.show()\n",
    "# 判断一个词是否全是中文\n",
    "def is_all_chinese(word):\n",
    "    for _char in word:\n",
    "        if not '\\u4e00' <= _char <= '\\u9fa5':\n",
    "            return False\n",
    "    return True\n",
    "\n",
    "# 主函数，程序入口\n",
    "if __name__ == '__main__':\n",
    "    # 获取《倾城之恋》的每个章节\n",
    "    chapters = format_chapters(\"倾城之恋.txt\")\n",
    "\n",
    "    # 读取停用词列表\n",
    "    with open(\"stopwords.txt\", 'r', encoding='utf-8-sig') as f:\n",
    "        stopwords = f.read().split(\"\\n\")\n",
    "\n",
    "    # 创建空列表，存储每个章节分词结果\n",
    "    corpus = []\n",
    "    # 遍历每个章节的内容\n",
    "    for chapter in chapters:\n",
    "        # 对每个章节的内容进行分词\n",
    "        words = jieba.cut(chapter)\n",
    "        # 创建空列表，存储词语\n",
    "        word_list = []\n",
    "        # 遍历每个词\n",
    "        for word in words:\n",
    "            # 如果这个词是中文，而且不在停用词列表中\n",
    "            if is_all_chinese(word) and word not in stopwords:\n",
    "                # 将其加入列表\n",
    "                word_list.append(word)\n",
    "        # 用空格连接列表中每个词，得到字符串，并将字符串加入语料库列表\n",
    "        corpus.append(\" \".join(word_list))\n",
    "\n",
    "    # 创建词向量\n",
    "    vectorizer = CountVectorizer()\n",
    "    # 将语料库转换为词向量\n",
    "    X = vectorizer.fit_transform(corpus)\n",
    "\n",
    "    # 创建lda模型，主题设为10个，迭代次数为100轮，方法为batch\n",
    "    lda = LatentDirichletAllocation(n_components=10, max_iter=100,learning_method='batch')\n",
    "    # 用词向量训练模型\n",
    "    lda.fit(X)\n",
    "    # 获取词向量的特证\n",
    "    tf_feature_names = vectorizer.get_feature_names()\n",
    "    # 打印结果\n",
    "    print_top_words(lda, tf_feature_names, n_top_words=30)\n",
    "    # 绘制热力图\n",
    "    plot_topic(lda.transform(X))\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.2"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
